Article Unit Barcodes
Frequency:
Article unit barcode master data changes are required to be sent in near real-time. Any change to an interface field in the external system should trigger the interface.
Expected data:
Article unit barcodes for different levels of the article package hierarchy.
Technical:
Barcodes are stored per article unit. A barcode that is not yet stored for that article unit is added; a barcode that is already stored is left unchanged.
The barcodes array is the complete list of barcodes for that article_id and unit_type_id. Barcodes stored in DSWMS that are missing from the request are deleted, unless they have already been used in a receive, in which case they are kept. Always send the full list, not only new barcodes.
POST https://{url}/v1/articles/units/barcodes
Create or update article unit barcodes.
Request Body
The request body is a JSON array of objects. Each object contains an article_id and a units array. Each unit contains a unit_type_id and a barcodes array.
Top-level object:
| Name | Type | Required | Description |
|---|---|---|---|
| article_id | string | Yes | Article unique identifier in ERP |
| units | array | Yes | Array of unit objects for the article |
Unit object (inside units array):
| Name | Type | Required | Description |
|---|---|---|---|
| unit_type_id | integer | Yes | Article unit type: 1 - base unit, 2 - warehouse unit, 3 - layer unit, 4 - pallet unit |
| barcodes | array | Yes | Array of barcode objects for the unit |
Barcode object (inside barcodes array):
| Name | Type | Required | Description |
|---|---|---|---|
| barcode_type_id | string | No | Barcode type. Not evaluated by DSWMS |
| barcode | string | Yes | Barcode value |
Request Example
[
{
"article_id": "0001",
"units": [
{
"unit_type_id": 1,
"barcodes": [
{
"barcode_type_id": "EAN13",
"barcode": "4013853567222"
},
{
"barcode_type_id": "EAN13",
"barcode": "4012918688192"
}
]
},
{
"unit_type_id": 2,
"barcodes": [
{
"barcode_type_id": "EAN13",
"barcode": "5012345678900"
},
{
"barcode_type_id": "EAN13",
"barcode": "5012345688192"
}
]
}
]
},
{
"article_id": "0047",
"units": [
{
"unit_type_id": 1,
"barcodes": [
{
"barcode_type_id": "EAN13",
"barcode": "4082957395474"
},
{
"barcode_type_id": "EAN13",
"barcode": "4071391238347"
}
]
}
]
}
]
Response
200: OK — Success
{
"success": true,
"message": null
}
400: Bad Request — Error
{
"success": false,
"message": "Not all article unit barcodes were imported",
"errors": [
{
"article_id": "0001",
"error": "Article unit 1 barcode is empty"
}
]
}